package javacode.Game3;

import javacode.Game3.Magician3;
import javacode.Game3.Role3;
import javacode.Game3.SwordsMan3;

/**
 * Created by lenovo on 2016/3/27.
 */
public class RPG3 {
    public static void main(String[] args){
        SwordsMan3 swordsMan=new SwordsMan3();
        swordsMan.setName("Justin");
        swordsMan.setLevel(1);
        swordsMan.setBlood(200);

        Magician3 magician =new Magician3() ;
        magician .setName("Monica");
        magician .setLevel(1);
        magician .setBlood(100);

        drawFight(swordsMan);
        drawFight(magician);
    }
    static void drawFight(Role3 role){
        System.out.printf(role.getName());
        role.fight();
    }
}
